package trival.selector;

import sun.tools.tree.ByteExpression;

import java.io.IOException;
import java.net.InetSocketAddress;
import java.nio.ByteBuffer;
import java.nio.channels.SocketChannel;
import java.util.Scanner;

public class client {
    public static void main(String[] args) throws IOException, InterruptedException {
        SocketChannel sc=SocketChannel.open();
        boolean localhost = sc.connect(new InetSocketAddress("localhost", 8080));
        System.out.println(localhost);

        Thread.sleep(5000);
        ByteBuffer byteBuffer=ByteBuffer.allocate(16);
        byteBuffer.putChar('S');
        sc.write(byteBuffer);
    }
}
